package pruebas;

import net.sourceforge.floggy.persistence.FloggyException;
import net.sourceforge.floggy.persistence.PersistableManager;

public class pruebaFroggy extends MIDlet {

	public pruebaFroggy() {

		Libro libro = new Libro();
		
		libro.fecha = new Date();
		libro.nombre = "Mi libro Migue";
		libro.ISBM = new Integer(12345);
		
		PersistableManager pm = PersistableManager.getInstance();
		
		try {
			int idLibro = pm.save(libro);
			Display.getDisplay(this).setCurrent(new Form("Okkkkk " + idLibro));
		} catch (FloggyException e) {
			e.printStackTrace();
		}
	}

	protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
		// TODO Auto-generated method stub

	}

	protected void pauseApp() {
		// TODO Auto-generated method stub

	}

	protected void startApp() throws MIDletStateChangeException {
		// TODO Auto-generated method stub

	}

}
